#include <iostream>

using namespace std;

void test_function_signature_match();

void print(int a, int b); // 1
void print(double a, double b); // 2


int main(int argc, char const *argv[])
{
    //test_function_signature();
    test_function_signature_match();
    return 0;
}

void test_function_signature_match()
{
    int a = 10;
    int b = 20;

    long x = 200;

    double m = 5.0;
    double n = 5.1;

    print(a, b); // use 1
    print(m, n); // use 2
    print(x, b); // use 1
    //print(m, b); // ? error: call of overloaded 'print(double&, int&)' is ambiguous
}

void print(int a, int b)
{
    cout << a << ", " << b << endl;
}


void print(double a, double b)
{
    cout << a << ", " << b << endl;
}

